﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$ArticleDBConnection$" formatter="bizobjlist of ArticleAppFunction">
  <Sql >
      SELECT 
        '$specifierId$' as specifierId,
        convert(nvarchar(510),a.id) as id,
        baseTitle as description
      FROM
        Articles as a
        LEFT OUTER JOIN	ObjectTreeNodes AS t ON a.id = t.objectId
        INNER JOIN ObjectTreeCounts as tc on tc.objectId = t.objectId
      WHERE
		t.id = tc.rootId AND
        CompanyId = @companyId;
  </Sql>
  <Param name="companyId" type="UniqueIdentifier" />
</AdoNetDataAccess>
